﻿using GrainManage.Entities.Trade;
using GrainManage.Proxy.Util;
using System.Reflection;

namespace GrainManage.Proxy
{
    public sealed class TradeProxy : GrainManage.Interface.ITrade
    {

        //************************************************POST************************************************
        public OutputGetByID GetByID(InputGetByID input)
        {
            var result = WebUtil.ExecuteByPost<OutputGetByID>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputGetDetailByContactID GetDetailByContactID(InputGetDetailByContactID input)
        {
            var result = WebUtil.ExecuteByPost<OutputGetDetailByContactID>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputSearchDetail SearchDetail(InputSearchDetail input)
        {
            var result = WebUtil.ExecuteByPost<OutputSearchDetail>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputGetTotal GetTotal(InputGetTotal input)
        {
            var result = WebUtil.ExecuteByPost<OutputGetTotal>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputGetTotalByArea GetTotalByArea(InputGetTotalByArea input)
        {
            var result = WebUtil.ExecuteByPost<OutputGetTotalByArea>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputGetTotalByContact GetTotalByContactArea(InputGetTotalByContact input)
        {
            var result = WebUtil.ExecuteByPost<OutputGetTotalByContact>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputInsert Insert(InputInsert input)
        {
            var result = WebUtil.ExecuteByPost<OutputInsert>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputUpdate Update(InputUpdate input)
        {
            var result = WebUtil.ExecuteByPost<OutputUpdate>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputDelete Delete(InputDelete input)
        {
            var result = WebUtil.ExecuteByPost<OutputDelete>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputBatchInsert BatchInsert(InputBatchInsert input)
        {
            var result = WebUtil.ExecuteByPost<OutputBatchInsert>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputBatchUpdate BatchUpdate(InputBatchUpdate input)
        {
            var result = WebUtil.ExecuteByPost<OutputBatchUpdate>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputBatchDelete BatchDelete(InputBatchDelete input)
        {
            var result = WebUtil.ExecuteByPost<OutputBatchDelete>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }
    }
}
